import {request} from 'umi';
import {modulesUrl} from "@/assets/constant/modulesUrl";
import {getApiPrefix, getServiceParams} from "@/assets/utils/utils";

/**
 * 获取当前用户
 * @param params
 */
export async function getCurrentUser() {
  return request(getApiPrefix(modulesUrl.sysUser) + "/getCurrentUser");
}

/**
 * 退出登录
 * @param params
 */
export async function logout() {
  let serviceParams = getServiceParams()
  return request(serviceParams.mapping + "/cdpLogout");
}
